<?php

namespace App\Console\Commands;

use App\Models\User;
use Illuminate\Console\Command;

class CountActiveUsers extends Command {

    protected $signature = 'mychat:count-active-users';
    protected $description = '获取活跃用户数据';
    public function handle(User $user) {
        $this->info('开始获取活跃用户数据...');
        $user->countAndCacheActiveUsers();
        $this->info('获取活跃用户数据完成');
    }
}
